package cn.edu.ahtcm.mapper;

import cn.edu.ahtcm.bean.Article;
import cn.edu.ahtcm.bean.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ArticleMapper {
    @Select("select * from t_article where title = #{title}")
    Article selectByTitle(String title);

    @Insert("insert into t_article values(null,#{title},#{content})")
    void addArticle(Article article);

    @Select("select * from t_article")
    List<Article> select();

    @Select("select * from t_article where id = #{id}")
    Article selectById(int id);


    boolean delete(int id);

    boolean update(Article article);




}
